<template>
  <el-dialog
    title="新增"
    :visible.sync="dialogBianji"
    :center="true"
    :close-on-click-modal="false"
    :before-close="ss"
    @close="dialogClose"
    width="30%">
    <el-form label-position="right" label-width="80px" :model="states">
      <el-form-item label="国家">
        <el-input v-model="states.state"></el-input>
      </el-form-item>
      <el-form-item label="首都">
        <el-input v-model="states.capital"></el-input>
      </el-form-item>
      <el-form-item label="大洲">
        <el-select v-model="states.continent" placeholder="大洲">
          <el-option label="亚洲" value="亚洲"></el-option>
          <el-option label="欧洲" value="欧洲"></el-option>
          <el-option label="非洲" value="非洲"></el-option>
          <el-option label="北美洲" value="北美洲"></el-option>
          <el-option label="南美洲" value="南美洲"></el-option>
          <el-option label="大洋洲" value="大洋洲"></el-option>
          <el-option label="南极洲" value="南极洲"></el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
        <el-button @click="dialogClose">取 消</el-button>
        <el-button type="primary" @click="determine">确 定</el-button>
      </span>
  </el-dialog>
</template>
<script>
    export default {
        name: "bianjin",
        props:["dialogBianji"],
        data() {
          return {
             states:{
                 state:'',
                 capital:'',
                 continent:''
               }
          }
        },
      methods:{
          dialogClose(){
            console.log('1')
            this.$emit('bianji-show')
          },
        ss(){
            console.log('sssssssss')
           this.dialogClose()
        },
        determine(){
          this.$emit('determine',this.states)
          this.states = {}
        }
      },
      computed:{
      }
    }
</script>

<style scoped>

</style>
